﻿@namespace MatBlazor
@inherits BaseMatIconButton

<button type="button" class="@ClassMapper.AsString()" style="@StyleMapper.AsString()" @ref="Ref"  disabled=@Disabled @onclick="OnClickHandler" @onclick:stopPropagation=@OnClickStopPropagation @onmousedown="OnMouseDown" href=@Link @attributes="Attributes" Id="@Id">
    @if (Icon != null)
    {
        @if (ToggleIcon != null && Toggled)
         {
             <MatIcon Icon="@ToggleIcon"></MatIcon>
         }
         else
         {
             <MatIcon Icon="@Icon"></MatIcon>
         }
    }
    @ChildContent
</button>